package com.itmaster;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

import com.itmaster.domain.model.News;

/**
 * @author fernando.perez
 */
public class NewsDetailActivity extends Activity {

	protected static final String NEWS_EXTRA_VALUE = "news.extra.value";

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		setContentView(R.layout.activity_news_detail);
		
		TextView newsTitle = (TextView) findViewById(R.id.newsTitle);
		TextView newsDescription = (TextView) findViewById(R.id.newsDescription);
		
		News news = (News) getIntent().getExtras().getSerializable(NEWS_EXTRA_VALUE);

		newsTitle.setText(news.getTitle());
		newsDescription.setText(news.getDescription());
	}
}
